#include "Dual_Link_List.h"

int main() {
	pNode L = createLinkList("ListConfiguration.txt");
	if(!L) {
		printf("fail to create Link List!\n");
		exit(1);
	}
	printList(L);
	printf("The length of the link list is %d\n",getLength(L));

	if(insertNode(L,0,'*') == FAILURE) {
		printf("fail to insert new node\n");
		printf("Program exit!\n");
		exit(1);
	}
	printList(L);
	printf("The length of the link list is %d\n",getLength(L));	
	
	BaseType* e = (BaseType*)malloc(sizeof(BaseType));
	if(deleteNode(L,0,e) == FAILURE) {
		printf("Fail to delete the node\n");	
		printf("Program exit!\n");
		exit(1);
	}
	printList(L);
	printf("The length of the link list is %d\n",getLength(L));	
}
